package UseCollection;

import java.util.ArrayList;
import java.util.Collection;

public class CollectionTest {
    public static void main(String[] args) {
        test();
    }
    public static void test(){
        // 回答的问题是test中有哪些单词？
        // 1.增 list永远都是true set有就是false 没有就是ture
        Collection<String> girlfriends = new ArrayList<>();
        girlfriends.add("阿慧");
        girlfriends.add("阿平");
        girlfriends.add("阿朱");
        // 2.删
        girlfriends.remove("刘亦菲");
        // girlfriends.clear();

        //3.查
        Boolean whether = girlfriends.contains("小平");
        System.out.println(whether);
        System.out.println(girlfriends.isEmpty());
        System.out.println(girlfriends.size());
        System.out.println(girlfriends);




    }
}
